package org.tamal;

import com.google.appengine.api.utils.SystemProperty;

/**
 * This class contains all the constants used in this application.
 * @author Tamal Kanti Nath
 */
public final class Constants {

    /**
     * Indicates the app-engine environment is production or not.
     */
    public static final boolean PRODUCTION = SystemProperty.environment.value() == SystemProperty.Environment.Value.Production;

    /**
     * The Message bundle name.
     */
    public static final String MSG = "msg";

    /**
     * The redirect URI.
     */
    public static final String REDIRECT_URI = PRODUCTION
            ? "http://tamalnath.appspot.com/LoginServlet"
            : "http://localhost:8080/LoginServlet";

    /**
     * The User-agent entity kind.
     */
    public static final String USER_AGENT = "User-Agent";

    /**
     * The current entity for "User-Agent" entity kind.
     */
    public static final String CURRENT = "current";

    /**
     * The total entity for "User-Agent" entity kind.
     */
    public static final String TOTAL = "total";

    /**
     * The ISO 8601 DateFormat.
     */
    public static final String DATE_FORMAT_ISO = "yyyy-MM-dd";

    /**
     * The RFC 2822 date format.
     */
    public static final String DATE_FORMAT_RFC = "EEE MMM dd yyyy HH:mm:ss 'GMT'Z (z)";

    private Constants() {
        // Empty
    }

}
